package net.mingsoft.basic.bean;

import org.springframework.web.multipart.*;

public class UploadConfigBean
{
    private String uploadPath;
    private MultipartFile file;
    private boolean rename;
    private boolean appId;
    private String rootPath;
    private boolean uploadFolderPath;
    private String fileIdentifier;
    private String fileName;
    private long fileSize;
    
    public UploadConfigBean() {
        this.rename = true;
        this.appId = false;
    }
    
    public UploadConfigBean(final String fileName, final String rootPath) {
        this.rename = true;
        this.appId = false;
        this.rootPath = rootPath;
    }
    
    public UploadConfigBean(final String uploadPath, final MultipartFile file, final String rootPath, final boolean uploadFolderPath) {
        this.rename = true;
        this.appId = false;
        this.rootPath = rootPath;
        this.uploadFolderPath = uploadFolderPath;
        this.setUploadPath(uploadPath);
        this.setFile(file);
    }
    
    public UploadConfigBean(final String uploadPath, final MultipartFile file, final String rootPath) {
        this.rename = true;
        this.appId = false;
        this.rootPath = rootPath;
        this.setUploadPath(uploadPath);
        this.setFile(file);
    }
    
    public UploadConfigBean(final String uploadPath, final MultipartFile file, final String rootPath, final boolean uploadFolderPath, final boolean rename) {
        this.rename = true;
        this.appId = false;
        this.rootPath = rootPath;
        this.uploadFolderPath = uploadFolderPath;
        this.setUploadPath(uploadPath);
        this.setFile(file);
        this.setRename(rename);
    }
    
    public UploadConfigBean(final String uploadPath, final MultipartFile file, final String rootPath, final boolean uploadFolderPath, final boolean rename, final String fileIdentifier, final String fileName, final long fileSize) {
        this.rename = true;
        this.appId = false;
        this.uploadPath = uploadPath;
        this.file = file;
        this.rename = rename;
        this.rootPath = rootPath;
        this.uploadFolderPath = uploadFolderPath;
        this.fileIdentifier = fileIdentifier;
        this.fileName = fileName;
        this.fileSize = fileSize;
    }
    
    public boolean isAppId() {
        return this.appId;
    }
    
    public void setAppId(final boolean appId) {
        this.appId = appId;
    }
    
    public boolean isRename() {
        return this.rename;
    }
    
    public void setRename(final boolean rename) {
        this.rename = rename;
    }
    
    public String getUploadPath() {
        return this.uploadPath;
    }
    
    public void setUploadPath(final String uploadPath) {
        this.uploadPath = uploadPath;
    }
    
    public MultipartFile getFile() {
        return this.file;
    }
    
    public void setFile(final MultipartFile file) {
        this.file = file;
    }
    
    public String getRootPath() {
        return this.rootPath;
    }
    
    public void setRootPath(final String rootPath) {
        this.rootPath = rootPath;
    }
    
    public boolean isUploadFolderPath() {
        return this.uploadFolderPath;
    }
    
    public void setUploadFolderPath(final boolean uploadFolderPath) {
        this.uploadFolderPath = uploadFolderPath;
    }
    
    public String getFileIdentifier() {
        return this.fileIdentifier;
    }
    
    public void setFileIdentifier(final String fileIdentifier) {
        this.fileIdentifier = fileIdentifier;
    }
    
    public String getFileName() {
        return this.fileName;
    }
    
    public void setFileName(final String fileName) {
        this.fileName = fileName;
    }
    
    public long getFileSize() {
        return this.fileSize;
    }
    
    public void setFileSize(final long fileSize) {
        this.fileSize = fileSize;
    }
}
